{template "content","header"}
<!--
<div style="width:1070px;margin:auto;">
<iframe width="1070" src="index.php?m=content&c=index&a=lists&catid=<?php //if(isset($k)){echo $k;}else{echo '10';}?>" name="main" id="iframepage" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" onLoad="iFrameHeight()"> </iframe>
<div id="loading" style="display:none;"><img alt="Loading..." src="{IMG_PATH}loadingbar1.gif"><div></div></div>
</div>
-->
<link type="text/css" rel="stylesheet" href="{CSS_PATH}style.css" />
<style type="text/css">
.fe_t dl img {

max-width:260px;
 max-height:260px; 
 scale:expression(
 (this.offsetWidth > this.offsetHeight)?(this.style.width = this.offsetWidth >= 260 ? "260px" : "auto"):(this.style.height = this.offsetHeight >= 260 ? "260px" : "auto"));
 display:inline !important;
 }
.fe_t dl{
	display:block;
	width:260px;
	float:left;
}


 
 </style>
<div class="fe_t">
<!--<div class="fe_t">-->
	{pc:content  action="lists" catid="26" moreinfo="1" order="id DESC" num="20"}
	 {loop $data $key $val}
	<dl >
    	<dt>
        	<h3><i>KRW:</i><span>{$val['price']}</span></h3>
        	<h4><i>NO:</i><span>{$val['title']}</span></h4>
        </dt>
        <dd style="margin:0px;padding:0px; vertical-align:middle;"><a href="{$val['url']}" target="_blank"><img src="{$val['thumb']}"  /></a></dd>
    </dl>
	 {/loop}
	{/pc}

<!--</div>-->
<div id="loading" style="display:none;"><img alt="Loading..." src="{IMG_PATH}loadingbar1.gif"><div></div></div>
</div>

<input type="hidden" id="daoh" value="">

<script type="text/javascript" language="javascript"> 
var $ci = 0;
function cli(id){
$ci = 0;
	$('#daoh').val('');
	$('#sousuo').val('');
	$('#hidden').val(id);
	$('.fe_t').html('');
	$.post("index.php?m=content&c=index&a=liebiao", { "catid": id },function(data){
	
	$str = '';
		$info = data.res;
		for($i=0;$i<data.num;$i++){
			$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
		}	
		$('.fe_t').append($str);
	}, "json");
}
$('#search').click(function(){
$ci = 0;
	$text = $('#sousuo').val();
	$('#daoh').val('');
	if($text==''){
		alert('搜索内容为空，请重新输入！');
		return false;
	}
	$('.fe_t').html('');
	$.post("index.php?m=content&c=index&a=liebiao", { "search": $text },function(data){
		$str = '';
		$info = data.res;
		for($i=0;$i<data.num;$i++){
			$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
		}	
		$('.fe_t').append($str);
	}, "json");	
});
var timmerShowPic='';
	$(window).scroll(function(){
	if(timmerShowPic!=''){
		clearTimeout(timmerShowPic);
	}
	var height = document.documentElement.scrollTop || document.body.scrollTop;//当前高度
	var sheight = document.documentElement.clientHeight;//scroll高度
	var allheight = document.body.clientHeight;//总高度
	var cha = allheight-sheight;
	timmerShowPic=setTimeout(function(){
			var imgHiden=$('[data-src]');
			imgHiden.each(function(){
				if($(this).offset().top+$(this).parent().parent().height()>$(window).scrollTop()&&($(this).offset().top-$(window).scrollTop()<$(window).height())){
					var imgSrc=$(this).attr('data-src');
					$(this).attr('src',imgSrc).removeAttr('data-src');
				}
			});
		},200);
	if((cha-height)<370){

		$text = $('#sousuo').val();
		$cat = $('#hidden').val();
		$daoh = $('#daoh').val();
		if($daoh=='daoh'){
			return false;
		}else{
			$ci++;
		}	
		$("#loading").css({display:'block'});
		$.post("index.php?m=content&c=index&a=liebiao", { "search": $text,"catid": $cat,"ci": $ci },function(data){
			$str = '';
			$info = data.res;
			for($i=0;$i<data.num;$i++){
				$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img data-src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
			}	
			$('.fe_t').append($str);
			$("#loading").css({display:'none'});
		}, "json");
	
	} 
	
});
$(document).keydown(function (event) {
	if(event.keyCode == 13){
	$ci = 0;
	$('#daoh').val('');
	$text = $('#sousuo').val();
		if($text==''){
			alert('搜索内容为空，请重新输入！');
			return false;
		}
		$('.fe_t').html('');
		$.post("index.php?m=content&c=index&a=liebiao", { "search": $text },function(data){
			$str = '';
			$info = data.res;
			for($i=0;$i<data.num;$i++){
				$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
			}	
			$('.fe_t').append($str);
		}, "json");
	}
});
$('#dbright').click(function(){
	$('#daoh').val('daoh');
	$('.fe_t').html('');
	$str="<iframe width='1070' height='2750' id='iframepage' src='index.php?m=content&c=index&a=daoh' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' > </iframe>";
	$('.fe_t').append($str);
	return false;
});


</script>
</body>
</html>








